package com.functest.orm

import groovy.transform.ToString

/**
 * @author: DavydovMD
 * Date: 25.04.13
 * Time: 15:51
 */
@ToString(includeNames = true)
class MapperBinding {
    SingleDbTableMapper mapper = null
    JoinType joinType = JoinType.LEFT_OUTER
    List<Condition> conditionsList = []

    MapperBinding(SingleDbTableMapper mapper) {
        this.mapper = mapper
    }

    MapperBinding withJoinType(JoinType joinType) {
        this.joinType = joinType
        this
    }

    MapperBinding withConditions(List conditions) {
        this.conditionsList.addAll(conditions)
        this
    }
}
